/*
 * @Descripttion: 文件说明
 * @version: V1.0
 * @Author: GW
 * @Date: 2021-07-29 10:40:41
 * @LastEditors: GW
 * @LastEditTime: 2022-01-28 14:30:07
 */
import { axios } from "../../utils/request";

const api = {
    PageList: "/crm/customer/page",   //客户管理、联系人管理、联系记录管理动态查询
    List: "/crm/linkman/list",
    Save: "/crm/linkman/save",
    disable: "/crm/linkman/disable",  // 停用
    enable: "/crm/linkman/enable",    // 启用
    detail: "/crm/linkman/detail",     // 详情
    setKP: "/crm/linkman/setKP",     // 设置KP
    historyList: "/crm/linkman/pageHistoryList",//获取联系人历史操作记录
    pageNotTaskingLinkMan: "/crm/linkman/pageNotTaskingLinkMan",//查询 可以添加任务的 联系人
};

/**
 * 设置 关键人
 * @param {*} parameter
 */
 export function setKP (parameter) {
    return axios({
        url: api.setKP,
        method: "put",
        params: parameter

    });
};


/**
 * 动态条件查询
 * @param {*} data
 */
export function PageList (data) {
    return axios({
        url: api.PageList,
        method: "post",
        data: data
    });
}

/**
 * 条件查询 LIST
 */
export function List (data) {
    return axios({
        url: api.List,
        method: "get",
        params: data
    });
}
/**
 * 保存
 */
export function Save (data) {
    return axios({
        url: api.Save,
        method: "post",
        data: data
    });
}


/**
 * 启用
 */
export function enable (data) {
    return axios({
        url: api.enable,
        method: "get",
        params: data
    });
}

/**
 * 停用
 */
export function disable (data) {
    return axios({
        url: api.disable,
        method: "get",
        params: data
    });
}


/**
 * 详情
 */
export function detail (data) {
    return axios({
        url: api.detail,
        method: "get",
        params: data
    });
}

/**
 * 操作历史详情
 */
 export function historyList (data) {
    return axios({
        url: api.historyList,
        method: "get",
        params: data
    });
}

/**
 * 查询 可以添加任务的 联系人
 */
 export function pageNotTaskingLinkMan (data) {
    return axios({
        url: api.pageNotTaskingLinkMan,
        method: "post",
        data: data
    });
}
